package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 配品分类管理对象 accessory_category
 *
 * @author ruoyi
 * @date 2025-05-24
 */
public class AccessoryCategory extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 分类唯一标识符(主键) */
    private Long id;

    /** 分类名称(如"电子元件") */
    @Excel(name = "分类名称")
    private String categoryName;

    /** 分类编码(如"DZ-001") */
    @Excel(name = "分类编码")
    private String categoryCode;

    /** 该分类下配品数量(自动维护) */
    @Excel(name = "该分类下配品数量(自动维护)")
    private Long accessoryCount;

    /** 分类排序序号(数字越小越靠前) */
    @Excel(name = "分类排序序号(数字越小越靠前)")
    private Long sortOrder;

    /** 分类状态 */
    @Excel(name = "分类状态")
    private String status;

    /** 上级分类ID(根分类为NULL) */
    @Excel(name = "上级分类ID(根分类为NULL)")
    private Long parentId;

    /** 分类层级(自动计算) */
    @Excel(name = "分类层级(自动计算)")
    private Integer level;

    /** 分类路径(如"1/3/5") */
    @Excel(name = "分类路径")
    private String path;

    /** 是否叶子节点(自动计算) */
    @Excel(name = "是否叶子节点(自动计算)")
    private Integer isLeaf;

    /** 分类图标(如"fa fa-cog") */
    @Excel(name = "分类图标")
    private String icon;

    /** 分类描述 */
    @Excel(name = "分类描述")
    private String description;

    /** 最后更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastUpdateTime;

    /** 手机号 */
    @Excel(name = "手机号")
    private String phone;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setCategoryName(String categoryName)
    {
        this.categoryName = categoryName;
    }

    public String getCategoryName()
    {
        return categoryName;
    }

    public void setCategoryCode(String categoryCode)
    {
        this.categoryCode = categoryCode;
    }

    public String getCategoryCode()
    {
        return categoryCode;
    }

    public void setAccessoryCount(Long accessoryCount)
    {
        this.accessoryCount = accessoryCount;
    }

    public Long getAccessoryCount()
    {
        return accessoryCount;
    }

    public void setSortOrder(Long sortOrder)
    {
        this.sortOrder = sortOrder;
    }

    public Long getSortOrder()
    {
        return sortOrder;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }

    public void setParentId(Long parentId)
    {
        this.parentId = parentId;
    }

    public Long getParentId()
    {
        return parentId;
    }

    public void setLevel(Integer level)
    {
        this.level = level;
    }

    public Integer getLevel()
    {
        return level;
    }

    public void setPath(String path)
    {
        this.path = path;
    }

    public String getPath()
    {
        return path;
    }

    public void setIsLeaf(Integer isLeaf)
    {
        this.isLeaf = isLeaf;
    }

    public Integer getIsLeaf()
    {
        return isLeaf;
    }

    public void setIcon(String icon)
    {
        this.icon = icon;
    }

    public String getIcon()
    {
        return icon;
    }

    public void setDescription(String description)
    {
        this.description = description;
    }

    public String getDescription()
    {
        return description;
    }

    public void setLastUpdateTime(Date lastUpdateTime)
    {
        this.lastUpdateTime = lastUpdateTime;
    }

    public Date getLastUpdateTime()
    {
        return lastUpdateTime;
    }

    public void setPhone(String phone)
    {
        this.phone = phone;
    }

    public String getPhone()
    {
        return phone;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("categoryName", getCategoryName())
                .append("categoryCode", getCategoryCode())
                .append("accessoryCount", getAccessoryCount())
                .append("sortOrder", getSortOrder())
                .append("status", getStatus())
                .append("parentId", getParentId())
                .append("level", getLevel())
                .append("path", getPath())
                .append("isLeaf", getIsLeaf())
                .append("icon", getIcon())
                .append("description", getDescription())
                .append("lastUpdateTime", getLastUpdateTime())
                .append("phone", getPhone())
                .toString();
    }
}
